package com.canal.admin.dao;

import com.canal.admin.transfer.req.data.RtConvertConditions;
import com.canal.admin.transfer.req.data.RtDataDetailConditions;
import com.canal.admin.transfer.resp.rt.CanalUvIncome;
import com.canal.admin.transfer.resp.rt.RtConvertResp;
import com.canal.admin.transfer.resp.rt.RtDataResp;
import com.canal.admin.transfer.req.data.RtDataConditions;
import com.canal.admin.transfer.resp.rt.RtDetailResp;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author yangbo
 * @date 2020-06-24 15:29
 */
@Repository
public interface ZcolRtDataMapper {

    /**
     * 访问pv统计数据
     * @param conditions
     * @return
     */
    List<RtDataResp> rtDataList(@Param("conditions") RtDataConditions conditions);

    /**
     * 一个ip的访问明细
     * @param conditions
     * @return
     */
    List<RtDetailResp> rtDetailList(@Param("conditions") RtDataDetailConditions conditions);

    /**
     * 实时转换数据
     * @param conditions
     * @return
     */
    List<RtConvertResp> rtConvertList(@Param("conditions") RtConvertConditions conditions);

    /**
     * 查询商家收入信息
     * @param canals 渠道名称列表
     * @param diffDay 与当天相差天数
     * @return
     */
    List<CanalUvIncome> canalIncome(@Param("canals") List<String> canals,
                                     @Param("diff") Integer diffDay);
}
